package com.nba.controller;

import com.nba.entity.UserInfo;
import com.nba.mapper.UserInfoMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class Nba {
    @Resource
    private UserInfoMapper userInfoMapper;
    @GetMapping(value = "/hello")
    public String hello() {
      //   UserInfo userInfo = userInfoMapper.selectByPrimaryKey(1);
        UserInfo record = new UserInfo();
        record.setName("zhang");
        record.setAge("44");
        int insert = userInfoMapper.insert(record);
        return insert+"";
    }
}